home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / Pascal / Snippets / PNL Libraries / Libraries / SpriteWorld / SpriteWorld files / Interfaces / BlitPixie.p next >
Text File  |  1996-11-02  |  5KB  |  93 lines

  1. unit BlitPixie;
  2.  
  3. interface
  4.  
  5. {/--------------------------------------------------------------------------------------}
  6. {    BlitPixie.h}
  7. {}
  8. {    Description: This is the include file for all the BlitPixie source files.}
  9. {/--------------------------------------------------------------------------------------}
  10.  
  11.     uses
  12. {$IFC undefined THINK_Pascal}
  13.         Types, QuickDraw, 
  14. {$ENDC}
  15.         QDOffscreen, SWCommonHeaders, SpriteFrame, Sprite;
  16.  
  17. {/--------------------------------------------------------------------------------------}
  18. {        type definitions & conditional macros}
  19. {/--------------------------------------------------------------------------------------}
  20.  
  21. {$PUSH}
  22. {$ALIGN MAC68K}
  23.  
  24.     type
  25.         PixelChunk = UInt32;
  26.         PixelChunkPtr = ^PixelChunk;
  27.         PixelChunkHdl = ^PixelChunkPtr;
  28.  
  29. {}
  30. {BytesToChunks=(b) ((b) >> 2);}
  31. {ChunksToBytes=(b) ((b) << 2);}
  32. {}
  33.  
  34.     type
  35.         PixelPtr = ^UInt32;
  36.  
  37.     type
  38.         StarArray = record
  39.                 horizLoc: Integer;            { Current horizontal position of the star}
  40.                 vertLoc: Integer;            { Current vertical position of the star}
  41.                 oldHorizLoc: Integer;        { Horizontal position of star the previous frame}
  42.                 oldVertLoc: Integer;            { Vertical position of star the previous frame}
  43.                 horizSpeed: Integer;            { To be used by the user to move the star}
  44.                 vertSpeed: Integer;            { To be used by the user to move the star}
  45.                 color: Integer;                { Current color of the star}
  46.                 needsToBeErased: Boolean;    { If drawn last frame, then it needs to be erased.}
  47.                 userData: Integer;            { Reserved for user }
  48.             end;
  49.         StarArrayPtr = ^StarArray;
  50.  
  51. { I wouldn't call any of these directly (asm/C calling conventions), but passing them to SW should be safe enough }
  52.  
  53. {/--------------------------------------------------------------------------------------}
  54. {    Function prototypes for all-bit blitters}
  55. {/--------------------------------------------------------------------------------------}
  56.  
  57.     procedure BlitPixieAllBitRectDrawProc( srcFrameP, dstFrameP:FramePtr; var srcRect, dstRect: Rect );
  58.     procedure BPAllBitInterlacedRectDrawProc( srcFrameP, dstFrameP:FramePtr; var srcRect, dstRect: Rect );
  59.     procedure BlitPixieAllBitMaskDrawProc( srcFrameP, dstFrameP:FramePtr; var srcRect, dstRect: Rect );
  60.     procedure BlitPixieAllBitPartialMaskDrawProc( srcFrameP, dstFrameP:FramePtr; var srcRect, dstRect: Rect );
  61.     procedure BPAllBitInterlacedMaskDrawProc( srcFrameP, dstFrameP:FramePtr; var srcRect, dstRect: Rect );
  62.     procedure BPAllBitInterlacedPartialMaskDrawProc( srcFrameP, dstFrameP:FramePtr; var srcRect, dstRect: Rect );
  63.     procedure BlitPixieAllBit( srcPixelP, dstPixelP:PixelPtr; rowsToCopy, numBytesPerRow, srcRowStride, dstRowStride, srcExtraStart, dstExtraStart, dstExtraEnd:UInt32 );
  64.     procedure BlitPixieAllBitMask( srcPixelP, dstPixelP:PixelPtr; maskPixelP:PixelPtr; rowsToCopy, numBytesPerRow, srcRowStride, dstRowStride, srcExtraStart, dstExtraStart, dstExtraEnd:UInt32 );
  65.     procedure BlitPixieAllBitPartialMask( srcPixelP, dstPixelP:PixelPtr; maskPixelP:PixelPtr; rowsToCopy, numBytesPerRow, srcRowStride, dstRowStride, srcExtraStart, dstExtraStart, dstExtraEnd:UInt32 );
  66.  
  67. {/--------------------------------------------------------------------------------------}
  68. {    Function prototypes for 8-bit blitters}
  69. {/--------------------------------------------------------------------------------------}
  70.  
  71.     procedure BlitPixie8BitRectDrawProc( srcFrameP, dstFrameP:FramePtr; var srcRect, dstRect: Rect );
  72.     procedure BP8BitInterlacedRectDrawProc( srcFrameP, dstFrameP:FramePtr; var srcRect, dstRect: Rect );
  73.     procedure BlitPixie8BitMaskDrawProc( srcFrameP, dstFrameP:FramePtr; var srcRect, dstRect: Rect );
  74.     procedure BlitPixie8BitPartialMaskDrawProc( srcFrameP, dstFrameP:FramePtr; var srcRect, dstRect: Rect );
  75.     procedure BP8BitInterlacedMaskDrawProc( srcFrameP, dstFrameP:FramePtr; var srcRect, dstRect: Rect );
  76.     procedure BP8BitInterlacedPartialMaskDrawProc( srcFrameP, dstFrameP:FramePtr; var srcRect, dstRect: Rect );
  77.     procedure CompiledSprite8BitDrawProc( srcFrameP, dstFrameP:FramePtr; var srcRect, dstRect: Rect );
  78.     function BlitPixie8BitGetPixel( srcFrameP:FramePtr; thePoint:Point ):SignedByte;
  79.     procedure BlitPixie8BitSetPixel( srcFrameP:FramePtr; thePoint:Point; theColor:SignedByte );
  80.     procedure SWAnimate8BitStarField( spriteWorldP:SpriteWorldPtr; stars:StarArrayPtr; numStars, backColor:Integer);
  81.     procedure SWBlitPixie8BitFlipSprite( srcSpriteP:SpritePtr );
  82.     procedure BlitPixie8Bit( srcPixelP, dstPixelP:PixelChunkPtr; rowsToCopy, numBytesPerRow, srcRowStride, dstRowStride:UInt32);
  83.     procedure BlitPixieMask8Bit( srcPixelP, dstPixelP, maskPixelP:PixelPtr; rowsToCopy, numBytesPerRow, srcRowStride, dstRowStride:UInt32);
  84.     procedure BlitPixiePartialMask8Bit( srcPixelP, dstPixelP, maskPixelP:PixelPtr; rowsToCopy, numBytesPerRow, srcRowStride, dstRowStride:UInt32);
  85.  
  86. {$ALIGN RESET}
  87. {$POP}
  88.  
  89. {$IFC not undefined THINK_Pascal}
  90. implementation
  91. {$ENDC}
  92. end.
  93.